package edu.sctu.renpingan.day20150517.texttwo;

;

/**
 * Created by user18 on 2015/5/17.
 */
public class TextMore {
    TeaChar[] teaChars ;
    StuDent[] stuDent ;
    StuDent student = new StuDent();
    public TextMore(TeaChar[] teaChars){
       this.teaChars = teaChars;
    }

    public TeaChar[] textMore() {
        for (int i = 0; i <teaChars.length ; i++) {
            for (int j = i+1; j <teaChars.length ; j++) {
                if(teaChars[i].getNumber() > teaChars[j].getNumber()){
                    TeaChar teaChar1;
                    teaChar1 = teaChars[i];
                    teaChars[i] = teaChars[j];
                    teaChars[j] = teaChar1;
                }
            }
        }
        return teaChars;
    }

    public StuDent[] sotrNumber(){
        for (int i = 0; i <teaChars.length ; i++) {
            for (int j = i+1; j < stuDent.length ; j++) {
                for (int k = 0; k <stuDent.length; k++) {
                if(stuDent[i].getGrade() > stuDent[j].getGrade()) {
                   StuDent student2;
                    student2 = stuDent[j];
                    stuDent[j] = stuDent[k];
                    stuDent[k] = student2;
                }
                }
            }
        }
        return stuDent;
            }
    public TeaChar[] sortStudent(){
        for (int i = 0; i <teaChars.length ; i++) {
            teaChars[i].getTeacharjob().equals("教授");
        }
    return teaChars;
    }
            }



